package com.dawn.module.mp.controller.admin.msgtemplate.vo;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Schema(description = "管理后台 - 模板消息新增/修改 Request VO")
@Data
public class MsgTemplateSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25432")
    private Long id;

    @Schema(description = "appid", requiredMode = Schema.RequiredMode.REQUIRED, example = "12845")
    @NotEmpty(message = "appid不能为空")
    private String appid;

    @Schema(description = "微信公众号ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1930")
    @NotNull(message = "微信公众号ID不能为空")
    private Long accountId;

    @Schema(description = "公众号模板ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8236")
    @NotEmpty(message = "公众号模板ID不能为空")
    private String templateId;

    @Schema(description = "模版名称", example = "赵六")
    private String name;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "模板内容")
    private String content;

    @Schema(description = "消息内容")
    private JSONArray data;

    @Schema(description = "链接", example = "https://www.ynzykj.net")
    private String url;

    @Schema(description = "小程序信息")
    private JSONObject miniprogram;

    @Schema(description = "是否有效", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "是否有效不能为空")
    private Integer status;

}
